<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateElOrderCommentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('el_order_comment', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('order_id')->unsigned()->default(0);
            $table->integer('order_item_id')->unsigned()->default(0);
            $table->integer('item_id')->unsigned()->default(0); //评价的商品
            $table->text('item_meta')->nullable()->default(null);
            $table->integer('user_id')->unsigned();
            $table->text('contents')->nullable();
            $table->integer('point')->nullable()->defalut(0); //评价分数
            $table->string('status')->nullable(); //评价状态
            $table->timestamp('recommend_at')->nullable(); //推荐时间
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('el_order_comment');
    }
}
